﻿@namespace BootstrapBlazor
@inherits BootstrapComponentBase
@implements IDisposable

<div @ref="@Element" class="@Classname" style="@Style" role="alert" @attributes="@AdditionalAttributes">
    @if (HasHeader)
    {
        <div class="@HeaderClassname" style="font-size:larger">
            @IconContent
            <strong class="me-auto">@Title</strong>
            @if (_showCounterdown)
            {
                <small>@_counter 秒后关闭</small>
            }
            @if (_options?.ManualClose == true)
            {
                <button class="btn-close" @onclick="@Close"></button>
            }
        </div>
    }
    <div class="toast-body">
        @if (ChildContent is not null)
        {
            @ChildContent
        }
        else
        {
            @Message
        }
    </div>
</div>